import { request } from "@/utils/index";

export const articleGetChannelListService = () => {
  return request.get<Api.ResType<Api.Article.GetChannelListRes>>('/channels')
}

export const articleGetArticleListService = (params: Api.Article.GetArticleListParams) => {
  return request.get<Api.ResType<Api.Article.GetArticleListRes>>('/articles', {params})
}

export const articleGetArticleDetailService = (params: Api.Article.GetArticleDetailParams) => {
  return request.get<Api.ResType<Api.Article.GetArticleDetailRes>>(`/articles/${params.article_id}`)
}